package com.neusoft.taotao.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.neusoft.taotao.bean.Pager;
import com.neusoft.taotao.bean.TaoException;
import com.neusoft.taotao.mapper.SuperMapper;
import com.neusoft.taotao.service.SuperService;

/**
 * 
 * @author Dongy
 *
 */
public abstract class AbstractServiceImpl<T> implements SuperService<T> {

	@Autowired
	private SuperMapper<T> superMapper;

	@Override
	public boolean add(T param) throws TaoException {

		return superMapper.add(param);
	}

	@Override
	public boolean deleteById(int id) throws TaoException {

		return superMapper.deleteById(id);
	}

	@Override
	public boolean edit(T param) throws TaoException {

		return superMapper.edit(param);
	}

	@Override
	public List<T> findAll() {

		return superMapper.findAll();
	}

	@Override
	public List<T> findList(Pager<T> pager) throws TaoException {
		return superMapper.findList(pager);
	}

	@Override
	public int findTotal(Pager<T> pager) throws TaoException {
		return superMapper.findTotal(pager);
	}

}
